package lab03.test14;

import java.sql.*;

public class Test {
    public static void main(String[] args) {
        Connection connection = null;
        Statement statement = null;
        ResultSet resultSet = null;


        String sqlinsert1 = "insert into t_userinfo(usercode,username,password,email)" +
                "values('7102','宋小宝','1234456','125696@qq.com') ";
        String sqlselect="select *from t_userinfo";

        try {
            Class.forName("com.mysql.jdbc.Driver");
            connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/java_2017?serverTimezone=UTC",
                    "root",
                    "123456");
            statement = connection.createStatement();

            statement.execute(sqlinsert1);



        } catch (SQLException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
}
